/***********************************************************************
 * Module:  TestItem.java
 * Author:  DAC
 * Purpose: Defines the Class TestItem
 ***********************************************************************/
package com.group1.model;

/** @pdOid d5e15451-344b-438c-8e00-40371036e4fe */
public class TestItem {
   /** @pdOid bbbef8fc-846b-41c3-ad51-9eccd0a83aea */
   public long testitemId;
   /** @pdOid 1856743e-f4ca-4e44-b761-ea24365ef97b */
   public float testitemScore;
   /** @pdOid f7d47031-aaeb-48a2-a375-ab8932a59270 */
   public java.lang.String testitemNote;
   
   /** @pdRoleInfo migr=no name=TestSection assc=testItemInsideOfATest mult=0..1 side=A */
   public TestSection testSection;
   /** @pdRoleInfo migr=no name=Question assc=questionsCorrespondingToTestItem mult=0..1 side=A */
   public Question question;
   
   /** @pdOid dd0e7034-2298-43d4-998a-d0cc8b9adf8a */
   public long getTestitemId() {
      return testitemId;
   }
   
   /** @param newTestitemId
    * @pdOid 3cebc56b-a6be-4003-bbd1-0c647ac01772 */
   public void setTestitemId(long newTestitemId) {
      testitemId = newTestitemId;
   }
   
   /** @pdOid 8cbfa381-2698-452a-8856-5ec3f33484e1 */
   public float getTestitemScore() {
      return testitemScore;
   }
   
   /** @param newTestitemScore
    * @pdOid 80626354-9131-442e-bf9d-96631c7c668f */
   public void setTestitemScore(float newTestitemScore) {
      testitemScore = newTestitemScore;
   }
   
   /** @pdOid e44269b2-84fe-4b56-a813-69f52cbe717f */
   public java.lang.String getTestitemNote() {
      return testitemNote;
   }
   
   /** @param newTestitemNote
    * @pdOid 7aa4176e-5b46-4ae3-96be-01ce9b0747e9 */
   public void setTestitemNote(java.lang.String newTestitemNote) {
      testitemNote = newTestitemNote;
   }
   
   
   /** @pdGenerated default parent getter */
   public TestSection getTestSection() {
      return testSection;
   }
   
   /** @pdGenerated default parent setter
     * @param newTestSection */
   public void setTestSection(TestSection newTestSection) {
      if (this.testSection == null || !this.testSection.equals(newTestSection))
      {
         if (this.testSection != null)
         {
            TestSection oldTestSection = this.testSection;
            this.testSection = null;
            oldTestSection.removeTestItem(this);
         }
         if (newTestSection != null)
         {
            this.testSection = newTestSection;
            this.testSection.addTestItem(this);
         }
      }
   }
   /** @pdGenerated default parent getter */
   public Question getQuestion() {
      return question;
   }
   
   /** @pdGenerated default parent setter
     * @param newQuestion */
   public void setQuestion(Question newQuestion) {
      if (this.question == null || !this.question.equals(newQuestion))
      {
         if (this.question != null)
         {
            Question oldQuestion = this.question;
            this.question = null;
            oldQuestion.removeTestItem(this);
         }
         if (newQuestion != null)
         {
            this.question = newQuestion;
            this.question.addTestItem(this);
         }
      }
   }

}